# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 123
n 123(None)[return None
]:
	i: 44(JA), 86(JA), 119(), 122()
	o: 

nname: 122
n 122(None)[]:
	i: 0(f)
	o: 123()

nname: 119
n 119(None)[]:
	i: 117(AE)
	o: 123()

nname: 117
n 117(None)[]:
	i: 76(f)
	o: 119(AE)

nname: 86
n 86(None)[#, e
log.error('Unable to spawn AudioPlayer: %s', str(e))
]:
	i: 76(t)
	o: 123(JA)

nname: 76
n 76(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 40(except)
	o: 86(t), 117(f)

nname: 44
n 44(None)[from pygui.menu.players import AudioPlayer
AudioItem.player = AudioPlayer()
]:
	i: 40(try)
	o: 123(JA)

nname: 40
n 40(None)[]:
	i: 0(t)
	o: 44(try), 76(except)

nname: 0
n 0(AudioItem.player is None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 40(t), 122(f)

nname: 123
n 123(None)[return None
]:
	i: 44(JA), 86(JA), 76(f), 117(AE), 0(f)
	o: 

nname: 86
n 86(None)[#, e
log.error('Unable to spawn AudioPlayer: %s', str(e))
]:
	i: 76(t)
	o: 123(JA)

nname: 76
n 76(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 40(except)
	o: 86(t), 123(f)

nname: 44
n 44(None)[from pygui.menu.players import AudioPlayer
AudioItem.player = AudioPlayer()
]:
	i: 40(try)
	o: 123(JA)

nname: 40
n 40(None)[]:
	i: 0(t)
	o: 44(try), 76(except)

nname: 0
n 0(AudioItem.player is None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 40(t), 123(f)

nname: 123
n 123(None)[return None
]:
	i: 76(f), 0(f)
	o: 

nname: 76
n 76(None)[except Exception, e:
	log.error('Unable to spawn AudioPlayer: %s', str(e))
]:
	i: 40()
	o: 123(JA)

nname: 40
n 40(None)[try:
	from pygui.menu.players import AudioPlayer
	AudioItem.player = AudioPlayer()
]:
	i: 0(t)
	o: 76()

nname: 0
n 0(AudioItem.player is None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 40(t), 123(f)

nname: 123
n 123(None)[return None
]:
	i: 40(f), 0(f)
	o: 

nname: 40
n 40(None)[try:
	from pygui.menu.players import AudioPlayer
	AudioItem.player = AudioPlayer()
except Exception, e:
	log.error('Unable to spawn AudioPlayer: %s', str(e))
]:
	i: 0(t)
	o: 123(JA)

nname: 0
n 0(AudioItem.player is None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 40(t), 123(f)

nname: 0
n 0(None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
if AudioItem.player is None:
	try:
		from pygui.menu.players import AudioPlayer
		AudioItem.player = AudioPlayer()
	except Exception, e:
		log.error('Unable to spawn AudioPlayer: %s', str(e))
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756d96c>}
nname: 113
n 113(None)[return None
]:
	i: 9(), 59(), 92(), 111(AE)
	o: 

nname: 111
n 111(None)[]:
	i: 82(f)
	o: 113(AE)

nname: 92
n 92(None)[#, e
PRINT_EXCEPTION(e)
]:
	i: 82(t)
	o: 113()

nname: 82
n 82(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 53(except)
	o: 92(t), 111(f)

nname: 59
n 59(None)[self.player.play(self, items)
]:
	i: 53(try)
	o: 113()

nname: 53
n 53(None)[items = None
]:
	i: 33(), 49()
	o: 59(try), 82(except)

nname: 49
n 49(None)[]:
	i: 23(f)
	o: 53()

nname: 33
n 33(None)[]:
	i: 23(t)
	o: 53()

nname: 23
n 23(self.parent)[]:
	i: 0(f)
	o: 33(t), 49(f)

nname: 9
n 9(None)[self._npl_decision()
]:
	i: 0(t)
	o: 113()

nname: 0
n 0(self.wymedia_resource)[]:
	i: 
	o: 9(t), 23(f)

nname: 113
n 113(None)[return None
]:
	i: 9(), 59()
	o: 

nname: 59
n 59(None)[try:
	self.player.play(self, items)
except Exception, e:
	PRINT_EXCEPTION(e)
]:
	i: 23(try)
	o: 113()

nname: 23
n 23(None)[if self.parent:
	pass
items = None
]:
	i: 0(f)
	o: 59(try)

nname: 9
n 9(None)[self._npl_decision()
]:
	i: 0(t)
	o: 113()

nname: 0
n 0(self.wymedia_resource)[]:
	i: 
	o: 9(t), 23(f)

nname: 113
n 113(None)[return None
]:
	i: 9(), 23()
	o: 

nname: 23
n 23(None)[if self.parent:
	pass
items = None
try:
	self.player.play(self, items)
except Exception, e:
	PRINT_EXCEPTION(e)
]:
	i: 0(f)
	o: 113()

nname: 9
n 9(None)[self._npl_decision()
]:
	i: 0(t)
	o: 113()

nname: 0
n 0(self.wymedia_resource)[]:
	i: 
	o: 9(t), 23(f)

nname: 0
n 0(None)[if self.wymedia_resource:
	self._npl_decision()
else:
	if self.parent:
		pass
	items = None
	try:
		self.player.play(self, items)
	except Exception, e:
		PRINT_EXCEPTION(e)
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756d7ac>}
nname: 6
n 6(None)[player = None
media_update_fields = ('title', 'uri')
def __init__(self, wymedia_resource, type_='audio', **kw):
	MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
	if AudioItem.player is None:
		try:
			from pygui.menu.players import AudioPlayer
			AudioItem.player = AudioPlayer()
		except Exception, e:
			log.error('Unable to spawn AudioPlayer: %s', str(e))
	return None

def execute(self):
	if self.wymedia_resource:
		self._npl_decision()
	else:
		if self.parent:
			pass
		items = None
		try:
			self.player.play(self, items)
		except Exception, e:
			PRINT_EXCEPTION(e)
	return None

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756fa4c>}
nname: 123
n 123(None)[return None
]:
	i: 76(), 90(), 121(AE)
	o: 

nname: 121
n 121(None)[]:
	i: 80(f)
	o: 123(AE)

nname: 90
n 90(None)[#, e
log.error('Unable to spawn ImageViewer: %s', str(e))
]:
	i: 80(t)
	o: 123()

nname: 80
n 80(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 0(except)
	o: 90(t), 121(f)

nname: 76
n 76(None)[]:
	i: 43(), 75()
	o: 123()

nname: 75
n 75(None)[]:
	i: 28(f)
	o: 76()

nname: 43
n 43(None)[from pygui.menu.players import ImageViewer
ImageItem.player = ImageViewer()
]:
	i: 28(t)
	o: 76()

nname: 28
n 28(ImageItem.player is None)[]:
	i: 0(try)
	o: 43(t), 75(f)

nname: 0
n 0(None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 28(try), 80(except)

nname: 123
n 123(None)[return None
]:
	i: 80(), 0()
	o: 

nname: 80
n 80(None)[except Exception, e:
	log.error('Unable to spawn ImageViewer: %s', str(e))
]:
	i: 0()
	o: 123()

nname: 123
n 123(None)[return None
]:
	i: 80(), 0()
	o: 

nname: 0
n 0(None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
try:
	if ImageItem.player is None:
		from pygui.menu.players import ImageViewer
		ImageItem.player = ImageViewer()
]:
	i: 
	o: 123(), 80()

self.nodes: {0: <unpyclib.structure.node instance at 0xb756dcec>, 80: <unpyclib.structure.node instance at 0xb756da6c>, 123: <unpyclib.structure.node instance at 0xb756ddec>}
nname: 113
n 113(None)[return None
]:
	i: 9(), 59(), 92(), 111(AE)
	o: 

nname: 111
n 111(None)[]:
	i: 82(f)
	o: 113(AE)

nname: 92
n 92(None)[#, e
PRINT_EXCEPTION(e)
]:
	i: 82(t)
	o: 113()

nname: 82
n 82(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 53(except)
	o: 92(t), 111(f)

nname: 59
n 59(None)[self.player.play(self, items)
]:
	i: 53(try)
	o: 113()

nname: 53
n 53(None)[items = None
]:
	i: 33(), 49()
	o: 59(try), 82(except)

nname: 49
n 49(None)[]:
	i: 23(f)
	o: 53()

nname: 33
n 33(None)[]:
	i: 23(t)
	o: 53()

nname: 23
n 23(self.parent)[]:
	i: 0(f)
	o: 33(t), 49(f)

nname: 9
n 9(None)[self._npl_decision()
]:
	i: 0(t)
	o: 113()

nname: 0
n 0(self.wymedia_resource)[]:
	i: 
	o: 9(t), 23(f)

nname: 113
n 113(None)[return None
]:
	i: 9(), 59()
	o: 

nname: 59
n 59(None)[try:
	self.player.play(self, items)
except Exception, e:
	PRINT_EXCEPTION(e)
]:
	i: 23(try)
	o: 113()

nname: 23
n 23(None)[if self.parent:
	pass
items = None
]:
	i: 0(f)
	o: 59(try)

nname: 9
n 9(None)[self._npl_decision()
]:
	i: 0(t)
	o: 113()

nname: 0
n 0(self.wymedia_resource)[]:
	i: 
	o: 9(t), 23(f)

nname: 113
n 113(None)[return None
]:
	i: 9(), 23()
	o: 

nname: 23
n 23(None)[if self.parent:
	pass
items = None
try:
	self.player.play(self, items)
except Exception, e:
	PRINT_EXCEPTION(e)
]:
	i: 0(f)
	o: 113()

nname: 9
n 9(None)[self._npl_decision()
]:
	i: 0(t)
	o: 113()

nname: 0
n 0(self.wymedia_resource)[]:
	i: 
	o: 9(t), 23(f)

nname: 0
n 0(None)[if self.wymedia_resource:
	self._npl_decision()
else:
	if self.parent:
		pass
	items = None
	try:
		self.player.play(self, items)
	except Exception, e:
		PRINT_EXCEPTION(e)
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756d5ac>}
nname: 6
n 6(None)[player = None
media_update_fields = ('title', 'uri')
def __init__(self, wymedia_resource, type_='image', **kw):
	MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
	try:
		if ImageItem.player is None:
			from pygui.menu.players import ImageViewer
			ImageItem.player = ImageViewer()

def execute(self):
	if self.wymedia_resource:
		self._npl_decision()
	else:
		if self.parent:
			pass
		items = None
		try:
			self.player.play(self, items)
		except Exception, e:
			PRINT_EXCEPTION(e)
	return None

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756fbcc>}
nname: 123
n 123(None)[return None
]:
	i: 44(JA), 86(JA), 119(), 122()
	o: 

nname: 122
n 122(None)[]:
	i: 0(f)
	o: 123()

nname: 119
n 119(None)[]:
	i: 117(AE)
	o: 123()

nname: 117
n 117(None)[]:
	i: 76(f)
	o: 119(AE)

nname: 86
n 86(None)[#, e
log.error('Unable to spawn VideoPlayer: %s', str(e))
]:
	i: 76(t)
	o: 123(JA)

nname: 76
n 76(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 40(except)
	o: 86(t), 117(f)

nname: 44
n 44(None)[from pygui.menu.players import VideoPlayer
VideoItem.player = VideoPlayer()
]:
	i: 40(try)
	o: 123(JA)

nname: 40
n 40(None)[]:
	i: 0(t)
	o: 44(try), 76(except)

nname: 0
n 0(VideoItem.player is None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 40(t), 122(f)

nname: 123
n 123(None)[return None
]:
	i: 44(JA), 86(JA), 76(f), 117(AE), 0(f)
	o: 

nname: 86
n 86(None)[#, e
log.error('Unable to spawn VideoPlayer: %s', str(e))
]:
	i: 76(t)
	o: 123(JA)

nname: 76
n 76(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 40(except)
	o: 86(t), 123(f)

nname: 44
n 44(None)[from pygui.menu.players import VideoPlayer
VideoItem.player = VideoPlayer()
]:
	i: 40(try)
	o: 123(JA)

nname: 40
n 40(None)[]:
	i: 0(t)
	o: 44(try), 76(except)

nname: 0
n 0(VideoItem.player is None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 40(t), 123(f)

nname: 123
n 123(None)[return None
]:
	i: 76(f), 0(f)
	o: 

nname: 76
n 76(None)[except Exception, e:
	log.error('Unable to spawn VideoPlayer: %s', str(e))
]:
	i: 40()
	o: 123(JA)

nname: 40
n 40(None)[try:
	from pygui.menu.players import VideoPlayer
	VideoItem.player = VideoPlayer()
]:
	i: 0(t)
	o: 76()

nname: 0
n 0(VideoItem.player is None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 40(t), 123(f)

nname: 123
n 123(None)[return None
]:
	i: 40(f), 0(f)
	o: 

nname: 40
n 40(None)[try:
	from pygui.menu.players import VideoPlayer
	VideoItem.player = VideoPlayer()
except Exception, e:
	log.error('Unable to spawn VideoPlayer: %s', str(e))
]:
	i: 0(t)
	o: 123(JA)

nname: 0
n 0(VideoItem.player is None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 40(t), 123(f)

nname: 0
n 0(None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
if VideoItem.player is None:
	try:
		from pygui.menu.players import VideoPlayer
		VideoItem.player = VideoPlayer()
	except Exception, e:
		log.error('Unable to spawn VideoPlayer: %s', str(e))
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756da2c>}
nname: 146
n 146(None)[return None
]:
	i: 22(JA), 36(), 92(), 125(), 144(AE)
	o: 

nname: 144
n 144(None)[]:
	i: 115(f)
	o: 146(AE)

nname: 125
n 125(None)[#, e
PRINT_EXCEPTION(e)
]:
	i: 115(t)
	o: 146()

nname: 115
n 115(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 86(except)
	o: 125(t), 144(f)

nname: 92
n 92(None)[self.player.play(self, items)
]:
	i: 86(try)
	o: 146()

nname: 86
n 86(None)[items = None
]:
	i: 66(), 82()
	o: 92(try), 115(except)

nname: 82
n 82(None)[]:
	i: 56(f)
	o: 86()

nname: 66
n 66(None)[]:
	i: 56(t)
	o: 86()

nname: 56
n 56(self.parent)[]:
	i: 0(f)
	o: 66(t), 82(f)

nname: 36
n 36(None)[self._npl_decision(delay=delay)
]:
	i: 9(f)
	o: 146()

nname: 22
n 22(None)[self._npl_decision()
]:
	i: 9(t)
	o: 146(JA)

nname: 9
n 9(delay is None)[]:
	i: 0(t)
	o: 22(t), 36(f)

nname: 0
n 0(self.wymedia_resource)[]:
	i: 
	o: 9(t), 56(f)

nname: 146
n 146(None)[return None
]:
	i: 9(JA), 92()
	o: 

nname: 92
n 92(None)[try:
	self.player.play(self, items)
except Exception, e:
	PRINT_EXCEPTION(e)
]:
	i: 56(try)
	o: 146()

nname: 56
n 56(None)[if self.parent:
	pass
items = None
]:
	i: 0(f)
	o: 92(try)

nname: 9
n 9(None)[if delay is None:
	self._npl_decision()
else:
	self._npl_decision(delay=delay)
]:
	i: 0(t)
	o: 146(JA)

nname: 0
n 0(self.wymedia_resource)[]:
	i: 
	o: 9(t), 56(f)

nname: 146
n 146(None)[return None
]:
	i: 9(JA), 56()
	o: 

nname: 56
n 56(None)[if self.parent:
	pass
items = None
try:
	self.player.play(self, items)
except Exception, e:
	PRINT_EXCEPTION(e)
]:
	i: 0(f)
	o: 146()

nname: 9
n 9(None)[if delay is None:
	self._npl_decision()
else:
	self._npl_decision(delay=delay)
]:
	i: 0(t)
	o: 146(JA)

nname: 0
n 0(self.wymedia_resource)[]:
	i: 
	o: 9(t), 56(f)

nname: 0
n 0(None)[if self.wymedia_resource:
	if delay is None:
		self._npl_decision()
	else:
		self._npl_decision(delay=delay)
else:
	if self.parent:
		pass
	items = None
	try:
		self.player.play(self, items)
	except Exception, e:
		PRINT_EXCEPTION(e)
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7571b2c>}
nname: 6
n 6(None)[player = None
media_update_fields = ('title', 'uri', 'height', 'nrAudioChannels')
def __init__(self, wymedia_resource, type_='video', **kw):
	MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
	if VideoItem.player is None:
		try:
			from pygui.menu.players import VideoPlayer
			VideoItem.player = VideoPlayer()
		except Exception, e:
			log.error('Unable to spawn VideoPlayer: %s', str(e))
	return None

def execute(self, delay=None):
	if self.wymedia_resource:
		if delay is None:
			self._npl_decision()
		else:
			self._npl_decision(delay=delay)
	else:
		if self.parent:
			pass
		items = None
		try:
			self.player.play(self, items)
		except Exception, e:
			PRINT_EXCEPTION(e)
	return None

wpl_options = {}
]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756fc0c>}
nname: 6
n 6(None)[__doc__ = 'TV record (MPEG-2 TS). Extra options have to be passed\n    to wyplayer to ensure proper playback.\n    '
media_update_fields = ('title', 'uri', 'recordedDuration', 'dvbServiceId', 'channelName', 'recordedStartDateTime')
wpl_options = property()
]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756f8ec>}
nname: 123
n 123(None)[return None
]:
	i: 44(JA), 86(JA), 119(), 122()
	o: 

nname: 122
n 122(None)[]:
	i: 0(f)
	o: 123()

nname: 119
n 119(None)[]:
	i: 117(AE)
	o: 123()

nname: 117
n 117(None)[]:
	i: 76(f)
	o: 119(AE)

nname: 86
n 86(None)[#, e
log.error(' No DVD Player support: %s', str(e))
]:
	i: 76(t)
	o: 123(JA)

nname: 76
n 76(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 40(except)
	o: 86(t), 117(f)

nname: 44
n 44(None)[from pygui.menu.players import DVDPlayer
DVDItem.player = DVDPlayer()
]:
	i: 40(try)
	o: 123(JA)

nname: 40
n 40(None)[]:
	i: 0(t)
	o: 44(try), 76(except)

nname: 0
n 0(DVDItem.player is None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 40(t), 122(f)

nname: 123
n 123(None)[return None
]:
	i: 44(JA), 86(JA), 76(f), 117(AE), 0(f)
	o: 

nname: 86
n 86(None)[#, e
log.error(' No DVD Player support: %s', str(e))
]:
	i: 76(t)
	o: 123(JA)

nname: 76
n 76(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 40(except)
	o: 86(t), 123(f)

nname: 44
n 44(None)[from pygui.menu.players import DVDPlayer
DVDItem.player = DVDPlayer()
]:
	i: 40(try)
	o: 123(JA)

nname: 40
n 40(None)[]:
	i: 0(t)
	o: 44(try), 76(except)

nname: 0
n 0(DVDItem.player is None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 40(t), 123(f)

nname: 123
n 123(None)[return None
]:
	i: 76(f), 0(f)
	o: 

nname: 76
n 76(None)[except Exception, e:
	log.error(' No DVD Player support: %s', str(e))
]:
	i: 40()
	o: 123(JA)

nname: 40
n 40(None)[try:
	from pygui.menu.players import DVDPlayer
	DVDItem.player = DVDPlayer()
]:
	i: 0(t)
	o: 76()

nname: 0
n 0(DVDItem.player is None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 40(t), 123(f)

nname: 123
n 123(None)[return None
]:
	i: 40(f), 0(f)
	o: 

nname: 40
n 40(None)[try:
	from pygui.menu.players import DVDPlayer
	DVDItem.player = DVDPlayer()
except Exception, e:
	log.error(' No DVD Player support: %s', str(e))
]:
	i: 0(t)
	o: 123(JA)

nname: 0
n 0(DVDItem.player is None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 40(t), 123(f)

nname: 0
n 0(None)[MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
if DVDItem.player is None:
	try:
		from pygui.menu.players import DVDPlayer
		DVDItem.player = DVDPlayer()
	except Exception, e:
		log.error(' No DVD Player support: %s', str(e))
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75718ec>}
nname: 47
n 47(None)[]:
	i: 14(), 46()
	o: 

nname: 46
n 46(None)[]:
	i: 0(f)
	o: 47()

nname: 14
n 14(None)[return WindowedItemList(self, menu=self.menu, universe=self.universe)
]:
	i: 0(t)
	o: 47()

nname: 0
n 0(user_config['video']['dvdbrowse'])[]:
	i: 
	o: 14(t), 46(f)

nname: 0
n 0(None)[if user_config['video']['dvdbrowse']:
	return WindowedItemList(self, menu=self.menu, universe=self.universe)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb757156c>}
nname: 87
n 87(None)[return None
]:
	i: 20(JA), 62(JA), 83(), 86()
	o: 

nname: 86
n 86(None)[]:
	i: 0(f)
	o: 87()

nname: 83
n 83(None)[]:
	i: 81(AE)
	o: 87()

nname: 81
n 81(None)[]:
	i: 52(f)
	o: 83(AE)

nname: 62
n 62(None)[#, e
PRINT_EXCEPTION(e)
]:
	i: 52(t)
	o: 87(JA)

nname: 52
n 52(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 16(except)
	o: 62(t), 81(f)

nname: 20
n 20(None)[self.player.play(self, playlist=None, delay=delay)
]:
	i: 16(try)
	o: 87(JA)

nname: 16
n 16(None)[]:
	i: 0(t)
	o: 20(try), 52(except)

nname: 0
n 0(self['backend'] != 'upnp')[]:
	i: 
	o: 16(t), 86(f)

nname: 87
n 87(None)[return None
]:
	i: 20(JA), 62(JA), 52(f), 81(AE), 0(f)
	o: 

nname: 62
n 62(None)[#, e
PRINT_EXCEPTION(e)
]:
	i: 52(t)
	o: 87(JA)

nname: 52
n 52(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 16(except)
	o: 62(t), 87(f)

nname: 20
n 20(None)[self.player.play(self, playlist=None, delay=delay)
]:
	i: 16(try)
	o: 87(JA)

nname: 16
n 16(None)[]:
	i: 0(t)
	o: 20(try), 52(except)

nname: 0
n 0(self['backend'] != 'upnp')[]:
	i: 
	o: 16(t), 87(f)

nname: 87
n 87(None)[return None
]:
	i: 52(f), 0(f)
	o: 

nname: 52
n 52(None)[except Exception, e:
	PRINT_EXCEPTION(e)
]:
	i: 16()
	o: 87(JA)

nname: 16
n 16(None)[try:
	self.player.play(self, playlist=None, delay=delay)
]:
	i: 0(t)
	o: 52()

nname: 0
n 0(self['backend'] != 'upnp')[]:
	i: 
	o: 16(t), 87(f)

nname: 87
n 87(None)[return None
]:
	i: 16(f), 0(f)
	o: 

nname: 16
n 16(None)[try:
	self.player.play(self, playlist=None, delay=delay)
except Exception, e:
	PRINT_EXCEPTION(e)
]:
	i: 0(t)
	o: 87(JA)

nname: 0
n 0(self['backend'] != 'upnp')[]:
	i: 
	o: 16(t), 87(f)

nname: 0
n 0(None)[if self['backend'] != 'upnp':
	try:
		self.player.play(self, playlist=None, delay=delay)
	except Exception, e:
		PRINT_EXCEPTION(e)
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75713ec>}
nname: 6
n 6(None)[player = None
def __init__(self, wymedia_resource, type_='dvd', **kw):
	MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
	if DVDItem.player is None:
		try:
			from pygui.menu.players import DVDPlayer
			DVDItem.player = DVDPlayer()
		except Exception, e:
			log.error(' No DVD Player support: %s', str(e))
	return None

def browse(self):
	if user_config['video']['dvdbrowse']:
		return WindowedItemList(self, menu=self.menu, universe=self.universe)

def execute(self, delay=0):
	if self['backend'] != 'upnp':
		try:
			self.player.play(self, playlist=None, delay=delay)
		except Exception, e:
			PRINT_EXCEPTION(e)
	return None

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756fb6c>}
nname: 0
n 0(None)[DVDItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756ffcc>}
nname: 0
n 0(None)[]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756fc0c>}
nname: 6
n 6(None)[def __init__(self, wymedia_resource, type_='iso_dvd', **kw):
	DVDItem.__init__(self, wymedia_resource, type_=type_, **kw)

def browse(self):
	pass

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756fbac>}
nname: 0
n 0(None)[DirItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756ffec>}
nname: 6
n 6(None)[__doc__ = ' Item representing UPNP directory '
def __init__(self, wymedia_resource, type_='upnp', **kw):
	DirItem.__init__(self, wymedia_resource, type_=type_, **kw)

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756f7ec>}
nname: 0
n 0(None)[DirItem.__init__(self, wymedia_resource, type_=type_, **kw)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756feac>}
nname: 6
n 6(None)[__doc__ = ' Item representing Usb directory/device '
def __init__(self, wymedia_resource, type_='usb_device', **kw):
	DirItem.__init__(self, wymedia_resource, type_=type_, **kw)

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756f80c>}
nname: 98
n 98(None)[VideoItem.__init__(self, name, type_='youtubevideo', **kw)
self.parent = parent
return None
]:
	i: 19(JA), 61(JA), 94(), 97()
	o: 

nname: 97
n 97(None)[]:
	i: 0(f)
	o: 98()

nname: 94
n 94(None)[]:
	i: 92(AE)
	o: 98()

nname: 92
n 92(None)[]:
	i: 51(f)
	o: 94(AE)

nname: 61
n 61(None)[#, e
log.error('Unable to spawn YouTubeVideoPlayer: %s', str(e))
]:
	i: 51(t)
	o: 98(JA)

nname: 51
n 51(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 15(except)
	o: 61(t), 92(f)

nname: 19
n 19(None)[from pygui.menu.players.video_player import YoutubePlayer
YouTubeItem.player = YoutubePlayer()
]:
	i: 15(try)
	o: 98(JA)

nname: 15
n 15(None)[]:
	i: 0(t)
	o: 19(try), 51(except)

nname: 0
n 0(YouTubeItem.player is None)[]:
	i: 
	o: 15(t), 97(f)

nname: 98
n 98(None)[VideoItem.__init__(self, name, type_='youtubevideo', **kw)
self.parent = parent
return None
]:
	i: 19(JA), 61(JA), 51(f), 92(AE), 0(f)
	o: 

nname: 61
n 61(None)[#, e
log.error('Unable to spawn YouTubeVideoPlayer: %s', str(e))
]:
	i: 51(t)
	o: 98(JA)

nname: 51
n 51(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 15(except)
	o: 61(t), 98(f)

nname: 19
n 19(None)[from pygui.menu.players.video_player import YoutubePlayer
YouTubeItem.player = YoutubePlayer()
]:
	i: 15(try)
	o: 98(JA)

nname: 15
n 15(None)[]:
	i: 0(t)
	o: 19(try), 51(except)

nname: 0
n 0(YouTubeItem.player is None)[]:
	i: 
	o: 15(t), 98(f)

nname: 98
n 98(None)[VideoItem.__init__(self, name, type_='youtubevideo', **kw)
self.parent = parent
return None
]:
	i: 51(f), 0(f)
	o: 

nname: 51
n 51(None)[except Exception, e:
	log.error('Unable to spawn YouTubeVideoPlayer: %s', str(e))
]:
	i: 15()
	o: 98(JA)

nname: 15
n 15(None)[try:
	from pygui.menu.players.video_player import YoutubePlayer
	YouTubeItem.player = YoutubePlayer()
]:
	i: 0(t)
	o: 51()

nname: 0
n 0(YouTubeItem.player is None)[]:
	i: 
	o: 15(t), 98(f)

nname: 98
n 98(None)[VideoItem.__init__(self, name, type_='youtubevideo', **kw)
self.parent = parent
return None
]:
	i: 15(f), 0(f)
	o: 

nname: 15
n 15(None)[try:
	from pygui.menu.players.video_player import YoutubePlayer
	YouTubeItem.player = YoutubePlayer()
except Exception, e:
	log.error('Unable to spawn YouTubeVideoPlayer: %s', str(e))
]:
	i: 0(t)
	o: 98(JA)

nname: 0
n 0(YouTubeItem.player is None)[]:
	i: 
	o: 15(t), 98(f)

nname: 0
n 0(None)[if YouTubeItem.player is None:
	try:
		from pygui.menu.players.video_player import YoutubePlayer
		YouTubeItem.player = YoutubePlayer()
	except Exception, e:
		log.error('Unable to spawn YouTubeVideoPlayer: %s', str(e))
VideoItem.__init__(self, name, type_='youtubevideo', **kw)
self.parent = parent
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75719cc>}
nname: 0
n 0(None)[from pygui.facilities.turlututube import YoutubeData
self['uri'] = YoutubeData()._get_flv_uri(self['player_url'])
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75712cc>}
nname: 0
n 0(None)[return hash(self['id'])
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb757116c>}
nname: 57
n 57(None)[return False
]:
	i: 52(), 56()
	o: 

nname: 56
n 56(None)[]:
	i: 0(f)
	o: 57()

nname: 52
n 52(None)[return self['thumbnail'] == other['thumbnail']
]:
	i: 15(f), 36()
	o: 57()

nname: 36
n 36(None)[]:
	i: 15(t)
	o: 52()

nname: 15
n 15(self['thumbnail'] == other['thumbnail'])[]:
	i: 0(t)
	o: 36(t), 52(f)

nname: 0
n 0(isinstance(other, YouTubeItem))[]:
	i: 
	o: 15(t), 56(f)

nname: 57
n 57(None)[return False
]:
	i: 15(), 0(f)
	o: 

nname: 15
n 15(None)[if self['thumbnail'] == other['thumbnail']:
	pass
return self['thumbnail'] == other['thumbnail']
]:
	i: 0(t)
	o: 57()

nname: 0
n 0(isinstance(other, YouTubeItem))[]:
	i: 
	o: 15(t), 57(f)

nname: 0
n 0(None)[if isinstance(other, YouTubeItem):
	if self['thumbnail'] == other['thumbnail']:
		pass
	return self['thumbnail'] == other['thumbnail']
return False
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75710ac>}
nname: 0
n 0(None)[return not self == other
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb757198c>}
nname: 214
n 214(None)[return None
]:
	i: 101(), 160(), 188()
	o: 

nname: 188
n 188(None)[return cmp(type(self), type(other))
]:
	i: 131&147(f)
	o: 214()

nname: 160
n 160(None)[return cmp(self.wymedia_resource['id'], other['id'])
]:
	i: 131&147(t)
	o: 214()

nname: 131&147
n 131&147(isinstance(other, dict) and 'id' in other)[]:
	i: 0(f)
	o: 160(t), 188(f)

nname: 101
n 101(None)[return cmp(self.wymedia_resource['id'], other.wymedia_resource['id'])
]:
	i: 47(), 100()
	o: 214()

nname: 100
n 100(None)[]:
	i: 15&31(f)
	o: 101()

nname: 47
n 47(None)[return cmp(self.name + self.type + self['id'], other.name + other.type + other['id'])
]:
	i: 15&31(t)
	o: 101()

nname: 15&31
n 15&31(self.wymedia_resource is None or other.wymedia_resource is None)[]:
	i: 0(t)
	o: 47(t), 100(f)

nname: 0
n 0(isinstance(other, MediaItem))[]:
	i: 
	o: 15&31(t), 131&147(f)

nname: 214
n 214(None)[return None
]:
	i: 15&31(), 131&147()
	o: 

nname: 131&147
n 131&147(None)[if isinstance(other, dict) and 'id' in other:
	return cmp(self.wymedia_resource['id'], other['id'])
else:
	return cmp(type(self), type(other))
]:
	i: 0(f)
	o: 214()

nname: 15&31
n 15&31(None)[if self.wymedia_resource is None or other.wymedia_resource is None:
	return cmp(self.name + self.type + self['id'], other.name + other.type + other['id'])
return cmp(self.wymedia_resource['id'], other.wymedia_resource['id'])
]:
	i: 0(t)
	o: 214()

nname: 0
n 0(isinstance(other, MediaItem))[]:
	i: 
	o: 15&31(t), 131&147(f)

nname: 0
n 0(None)[if isinstance(other, MediaItem):
	if self.wymedia_resource is None or other.wymedia_resource is None:
		return cmp(self.name + self.type + self['id'], other.name + other.type + other['id'])
	return cmp(self.wymedia_resource['id'], other.wymedia_resource['id'])
else:
	if isinstance(other, dict) and 'id' in other:
		return cmp(self.wymedia_resource['id'], other['id'])
	else:
		return cmp(type(self), type(other))
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756d78c>}
nname: 72
n 72(None)[]:
	i: 18(), 51(), 70(AE)
	o: 

nname: 70
n 70(None)[]:
	i: 41(f)
	o: 72(AE)

nname: 51
n 51(None)[#, e
PRINT_EXCEPTION(e)
]:
	i: 41(t)
	o: 72()

nname: 41
n 41(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 0(except)
	o: 51(t), 70(f)

nname: 18
n 18(None)[self.player.play(self, items)
]:
	i: 0(try)
	o: 72()

nname: 0
n 0(None)[items = self.parent.browse()
]:
	i: 
	o: 18(try), 41(except)

nname: 41
n 41(None)[except Exception, e:
	PRINT_EXCEPTION(e)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[items = self.parent.browse()
try:
	self.player.play(self, items)
]:
	i: 
	o: 41()

nname: 0
n 0(None)[items = self.parent.browse()
try:
	self.player.play(self, items)
except Exception, e:
	PRINT_EXCEPTION(e)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb757170c>}
nname: 6
n 6(None)[player = None
def __init__(self, name, parent, **kw):
	if YouTubeItem.player is None:
		try:
			from pygui.menu.players.video_player import YoutubePlayer
			YouTubeItem.player = YoutubePlayer()
		except Exception, e:
			log.error('Unable to spawn YouTubeVideoPlayer: %s', str(e))
	VideoItem.__init__(self, name, type_='youtubevideo', **kw)
	self.parent = parent
	return None

wpl_options = dict(live='1', ifmt='mov,mp4,m4a,3gp,3g2,mj2', probe='0')
def media_update(self):
	from pygui.facilities.turlututube import YoutubeData
	self['uri'] = YoutubeData()._get_flv_uri(self['player_url'])

def __hash__(self):
	return hash(self['id'])

def __eq__(self, other):
	if isinstance(other, YouTubeItem):
		if self['thumbnail'] == other['thumbnail']:
			pass
		return self['thumbnail'] == other['thumbnail']
	return False

def __ne__(self, other):
	return not self == other

def __cmp__(self, other):
	if isinstance(other, MediaItem):
		if self.wymedia_resource is None or other.wymedia_resource is None:
			return cmp(self.name + self.type + self['id'], other.name + other.type + other['id'])
		return cmp(self.wymedia_resource['id'], other.wymedia_resource['id'])
	else:
		if isinstance(other, dict) and 'id' in other:
			return cmp(self.wymedia_resource['id'], other['id'])
		else:
			return cmp(type(self), type(other))
	return None

def execute(self):
	items = self.parent.browse()
	try:
		self.player.play(self, items)
	except Exception, e:
		PRINT_EXCEPTION(e)

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756ff2c>}
nname: 0
n 0(None)[MediaItem.__init__(self, name, type_='youtubedir', **kw)
self.list_fn = list_fn
self.parent = parent
self._content = None
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756fc2c>}
nname: 105
n 105(None)[return self._content
]:
	i: 74(JA), 87(JA), 101(), 104()
	o: 

nname: 104
n 104(None)[]:
	i: 0(t)
	o: 105()

nname: 87
n 87(None)[PRINT_EXCEPTION()
]:
	i: 9(except)
	o: 105(JA)

nname: 74
n 74(None)[del _[1]
for self._content in self.list_fn():
]:
	i: 13(AF), 33()
	o: 105(JA)

nname: 33
n 33(None)[for infos in self.list_fn():
]:
	i: 13(for)
	o: 74()

nname: 13
n 13(None)[]:
	i: 9(try)
	o: 33(for), 74(AF)

nname: 9
n 9(None)[]:
	i: 0(f)
	o: 13(try), 87(except)

nname: 0
n 0(self._content)[]:
	i: 
	o: 9(f), 104(t)

nname: 105
n 105(None)[return self._content
]:
	i: 74(JA), 87(JA), 101(), 0(t)
	o: 

nname: 87
n 87(None)[except:
	PRINT_EXCEPTION()
]:
	i: 9()
	o: 105(JA)

nname: 74
n 74(None)[del _[1]
for self._content in self.list_fn():
]:
	i: 9(AF), 33()
	o: 105(JA)

nname: 33
n 33(None)[for infos in self.list_fn():
]:
	i: 9(for)
	o: 74()

nname: 9
n 9(None)[try:
	pass
]:
	i: 0(f)
	o: 33(for), 74(AF), 87()

nname: 0
n 0(self._content)[]:
	i: 
	o: 9(f), 105(t)

self.nodes: {0: <unpyclib.structure.node instance at 0xb75718cc>, 33: <unpyclib.structure.node instance at 0xb757150c>, 100: <unpyclib.structure.node instance at 0xb75713ec>, 101: <unpyclib.structure.node instance at 0xb7571a8c>, 9: <unpyclib.structure.node instance at 0xb7571f2c>, 74: <unpyclib.structure.node instance at 0xb75717ac>, 105: <unpyclib.structure.node instance at 0xb7571cac>, 87: <unpyclib.structure.node instance at 0xb757116c>}
nname: 6
n 6(None)[def __init__(self, name, list_fn, parent=None, **kw):
	MediaItem.__init__(self, name, type_='youtubedir', **kw)
	self.list_fn = list_fn
	self.parent = parent
	self._content = None
	return None

def browse(self):
	pass

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756f70c>}
nname: 0
n 0(None)[from pygui.facilities.turlututube import YoutubeData
MediaItem.__init__(self, 'YouTube', type_='youtubedir', **kw)
self.client = YoutubeData()
self.parent = parent
self._items = None
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7571d2c>}
nname: 0
n 0(None)[return self.client.search(query)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb757702c>}
nname: 0
n 0(None)[return self.client.search(query)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb757764c>}
nname: 0
n 0(None)[txt = kb._text
new_dir = YouTubeSubContainer("%s '%s'" % (_('Search'), txt), (lambda query=txt: self.client.search(query)), menu=self.menu, parent=self)
self._items.append(new_dir)
kb.hide()
self.menu.get_item_list('main_list').append(new_dir)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756d68c>}
nname: 0
n 0(None)[from pygui.window import KeyboardWindow
kb = KeyboardWindow('Search for:', confirm_action=_validate)
kb.show()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756d20c>}
nname: 0
n 0(None)[return self.client.search(feed_type)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756da2c>}
nname: 0
n 0(None)[return self.client.search(feed_type)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756da6c>}
nname: 203
n 203(None)[return self._items
]:
	i: 121(), 202()
	o: 

nname: 202
n 202(None)[]:
	i: 0(t)
	o: 203()

nname: 121
n 121(None)[del _[1]
for self._items in enumerate(self.client._standard_feeds):
from pygui.item.core import ActionItem
self._items.append(ActionItem(_('Search') + '...', type_='exe', menu=self.menu, action=_search))
]:
	i: 9(AF), 66()
	o: 203()

nname: 66
n 66(None)[]:
	i: 9(for)
	o: 121()

nname: 9
n 9(None)[def _validate(kb):
	txt = kb._text
	new_dir = YouTubeSubContainer("%s '%s'" % (_('Search'), txt), (lambda query=txt: self.client.search(query)), menu=self.menu, parent=self)
	self._items.append(new_dir)
	kb.hide()
	self.menu.get_item_list('main_list').append(new_dir)

def _search():
	from pygui.window import KeyboardWindow
	kb = KeyboardWindow('Search for:', confirm_action=_validate)
	kb.show()

]:
	i: 0(f)
	o: 66(for), 121(AF)

nname: 0
n 0(self._items)[]:
	i: 
	o: 9(f), 202(t)

nname: 203
n 203(None)[return self._items
]:
	i: 121(), 0(t)
	o: 

nname: 121
n 121(None)[del _[1]
for self._items in enumerate(self.client._standard_feeds):
from pygui.item.core import ActionItem
self._items.append(ActionItem(_('Search') + '...', type_='exe', menu=self.menu, action=_search))
]:
	i: 9(AF), 9(for)
	o: 203()

nname: 9
n 9(None)[def _validate(kb):
	txt = kb._text
	new_dir = YouTubeSubContainer("%s '%s'" % (_('Search'), txt), (lambda query=txt: self.client.search(query)), menu=self.menu, parent=self)
	self._items.append(new_dir)
	kb.hide()
	self.menu.get_item_list('main_list').append(new_dir)

def _search():
	from pygui.window import KeyboardWindow
	kb = KeyboardWindow('Search for:', confirm_action=_validate)
	kb.show()

]:
	i: 0(f)
	o: 121(AF)

nname: 0
n 0(self._items)[]:
	i: 
	o: 9(f), 203(t)

self.nodes: {0: <unpyclib.structure.node instance at 0xb7571fcc>, 9: <unpyclib.structure.node instance at 0xb7571aec>, 203: <unpyclib.structure.node instance at 0xb757144c>, 121: <unpyclib.structure.node instance at 0xb757112c>}
nname: 6
n 6(None)[__metaclass__ = MetaSingleton
def __init__(self, parent=None, **kw):
	from pygui.facilities.turlututube import YoutubeData
	MediaItem.__init__(self, 'YouTube', type_='youtubedir', **kw)
	self.client = YoutubeData()
	self.parent = parent
	self._items = None
	return None

def browse(self):
	pass

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756f80c>}
nname: 98
n 98(None)[VideoItem.__init__(self, name, type_='dailymotionvideo', **kw)
self.parent = parent
return None
]:
	i: 19(JA), 61(JA), 94(), 97()
	o: 

nname: 97
n 97(None)[]:
	i: 0(f)
	o: 98()

nname: 94
n 94(None)[]:
	i: 92(AE)
	o: 98()

nname: 92
n 92(None)[]:
	i: 51(f)
	o: 94(AE)

nname: 61
n 61(None)[#, e
log.error('Unable to spawn DailyMotionVideoPlayer: %s', str(e))
]:
	i: 51(t)
	o: 98(JA)

nname: 51
n 51(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 15(except)
	o: 61(t), 92(f)

nname: 19
n 19(None)[from pygui.menu.players.video_player import DailyMotionPlayer
DailyMotionItem.player = DailyMotionPlayer()
]:
	i: 15(try)
	o: 98(JA)

nname: 15
n 15(None)[]:
	i: 0(t)
	o: 19(try), 51(except)

nname: 0
n 0(DailyMotionItem.player is None)[]:
	i: 
	o: 15(t), 97(f)

nname: 98
n 98(None)[VideoItem.__init__(self, name, type_='dailymotionvideo', **kw)
self.parent = parent
return None
]:
	i: 19(JA), 61(JA), 51(f), 92(AE), 0(f)
	o: 

nname: 61
n 61(None)[#, e
log.error('Unable to spawn DailyMotionVideoPlayer: %s', str(e))
]:
	i: 51(t)
	o: 98(JA)

nname: 51
n 51(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 15(except)
	o: 61(t), 98(f)

nname: 19
n 19(None)[from pygui.menu.players.video_player import DailyMotionPlayer
DailyMotionItem.player = DailyMotionPlayer()
]:
	i: 15(try)
	o: 98(JA)

nname: 15
n 15(None)[]:
	i: 0(t)
	o: 19(try), 51(except)

nname: 0
n 0(DailyMotionItem.player is None)[]:
	i: 
	o: 15(t), 98(f)

nname: 98
n 98(None)[VideoItem.__init__(self, name, type_='dailymotionvideo', **kw)
self.parent = parent
return None
]:
	i: 51(f), 0(f)
	o: 

nname: 51
n 51(None)[except Exception, e:
	log.error('Unable to spawn DailyMotionVideoPlayer: %s', str(e))
]:
	i: 15()
	o: 98(JA)

nname: 15
n 15(None)[try:
	from pygui.menu.players.video_player import DailyMotionPlayer
	DailyMotionItem.player = DailyMotionPlayer()
]:
	i: 0(t)
	o: 51()

nname: 0
n 0(DailyMotionItem.player is None)[]:
	i: 
	o: 15(t), 98(f)

nname: 98
n 98(None)[VideoItem.__init__(self, name, type_='dailymotionvideo', **kw)
self.parent = parent
return None
]:
	i: 15(f), 0(f)
	o: 

nname: 15
n 15(None)[try:
	from pygui.menu.players.video_player import DailyMotionPlayer
	DailyMotionItem.player = DailyMotionPlayer()
except Exception, e:
	log.error('Unable to spawn DailyMotionVideoPlayer: %s', str(e))
]:
	i: 0(t)
	o: 98(JA)

nname: 0
n 0(DailyMotionItem.player is None)[]:
	i: 
	o: 15(t), 98(f)

nname: 0
n 0(None)[if DailyMotionItem.player is None:
	try:
		from pygui.menu.players.video_player import DailyMotionPlayer
		DailyMotionItem.player = DailyMotionPlayer()
	except Exception, e:
		log.error('Unable to spawn DailyMotionVideoPlayer: %s', str(e))
VideoItem.__init__(self, name, type_='dailymotionvideo', **kw)
self.parent = parent
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75715ec>}
nname: 0
n 0(None)[return hash(self['id'])
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75710ac>}
nname: 57
n 57(None)[return False
]:
	i: 52(), 56()
	o: 

nname: 56
n 56(None)[]:
	i: 0(f)
	o: 57()

nname: 52
n 52(None)[return self['thumbnail'] == other['thumbnail']
]:
	i: 15(f), 36()
	o: 57()

nname: 36
n 36(None)[]:
	i: 15(t)
	o: 52()

nname: 15
n 15(self['thumbnail'] == other['thumbnail'])[]:
	i: 0(t)
	o: 36(t), 52(f)

nname: 0
n 0(isinstance(other, DailyMotionItem))[]:
	i: 
	o: 15(t), 56(f)

nname: 57
n 57(None)[return False
]:
	i: 15(), 0(f)
	o: 

nname: 15
n 15(None)[if self['thumbnail'] == other['thumbnail']:
	pass
return self['thumbnail'] == other['thumbnail']
]:
	i: 0(t)
	o: 57()

nname: 0
n 0(isinstance(other, DailyMotionItem))[]:
	i: 
	o: 15(t), 57(f)

nname: 0
n 0(None)[if isinstance(other, DailyMotionItem):
	if self['thumbnail'] == other['thumbnail']:
		pass
	return self['thumbnail'] == other['thumbnail']
return False
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7571eac>}
nname: 0
n 0(None)[return not self == other
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7571a4c>}
nname: 214
n 214(None)[return None
]:
	i: 101(), 160(), 188()
	o: 

nname: 188
n 188(None)[return cmp(type(self), type(other))
]:
	i: 131&147(f)
	o: 214()

nname: 160
n 160(None)[return cmp(self.wymedia_resource['id'], other['id'])
]:
	i: 131&147(t)
	o: 214()

nname: 131&147
n 131&147(isinstance(other, dict) and 'id' in other)[]:
	i: 0(f)
	o: 160(t), 188(f)

nname: 101
n 101(None)[return cmp(self.wymedia_resource['id'], other.wymedia_resource['id'])
]:
	i: 47(), 100()
	o: 214()

nname: 100
n 100(None)[]:
	i: 15&31(f)
	o: 101()

nname: 47
n 47(None)[return cmp(self.name + self.type + self['id'], other.name + other.type + other['id'])
]:
	i: 15&31(t)
	o: 101()

nname: 15&31
n 15&31(self.wymedia_resource is None or other.wymedia_resource is None)[]:
	i: 0(t)
	o: 47(t), 100(f)

nname: 0
n 0(isinstance(other, MediaItem))[]:
	i: 
	o: 15&31(t), 131&147(f)

nname: 214
n 214(None)[return None
]:
	i: 15&31(), 131&147()
	o: 

nname: 131&147
n 131&147(None)[if isinstance(other, dict) and 'id' in other:
	return cmp(self.wymedia_resource['id'], other['id'])
else:
	return cmp(type(self), type(other))
]:
	i: 0(f)
	o: 214()

nname: 15&31
n 15&31(None)[if self.wymedia_resource is None or other.wymedia_resource is None:
	return cmp(self.name + self.type + self['id'], other.name + other.type + other['id'])
return cmp(self.wymedia_resource['id'], other.wymedia_resource['id'])
]:
	i: 0(t)
	o: 214()

nname: 0
n 0(isinstance(other, MediaItem))[]:
	i: 
	o: 15&31(t), 131&147(f)

nname: 0
n 0(None)[if isinstance(other, MediaItem):
	if self.wymedia_resource is None or other.wymedia_resource is None:
		return cmp(self.name + self.type + self['id'], other.name + other.type + other['id'])
	return cmp(self.wymedia_resource['id'], other.wymedia_resource['id'])
else:
	if isinstance(other, dict) and 'id' in other:
		return cmp(self.wymedia_resource['id'], other['id'])
	else:
		return cmp(type(self), type(other))
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756d28c>}
nname: 72
n 72(None)[]:
	i: 18(), 51(), 70(AE)
	o: 

nname: 70
n 70(None)[]:
	i: 41(f)
	o: 72(AE)

nname: 51
n 51(None)[#, e
PRINT_EXCEPTION(e)
]:
	i: 41(t)
	o: 72()

nname: 41
n 41(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 0(except)
	o: 51(t), 70(f)

nname: 18
n 18(None)[self.player.play(self, items)
]:
	i: 0(try)
	o: 72()

nname: 0
n 0(None)[items = self.parent.browse()
]:
	i: 
	o: 18(try), 41(except)

nname: 41
n 41(None)[except Exception, e:
	PRINT_EXCEPTION(e)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[items = self.parent.browse()
try:
	self.player.play(self, items)
]:
	i: 
	o: 41()

nname: 0
n 0(None)[items = self.parent.browse()
try:
	self.player.play(self, items)
except Exception, e:
	PRINT_EXCEPTION(e)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7571bac>}
nname: 6
n 6(None)[player = None
def __init__(self, name, parent, **kw):
	if DailyMotionItem.player is None:
		try:
			from pygui.menu.players.video_player import DailyMotionPlayer
			DailyMotionItem.player = DailyMotionPlayer()
		except Exception, e:
			log.error('Unable to spawn DailyMotionVideoPlayer: %s', str(e))
	VideoItem.__init__(self, name, type_='dailymotionvideo', **kw)
	self.parent = parent
	return None

wpl_options = dict(vdrv='softdec', adrv='softdec', outwin=(0.080000000000000002, 0.17999999999999999, 0.45000000000000001, 0.59999999999999998), live='1', ifmt='flv', probe='0')
def __hash__(self):
	return hash(self['id'])

def __eq__(self, other):
	if isinstance(other, DailyMotionItem):
		if self['thumbnail'] == other['thumbnail']:
			pass
		return self['thumbnail'] == other['thumbnail']
	return False

def __ne__(self, other):
	return not self == other

def __cmp__(self, other):
	if isinstance(other, MediaItem):
		if self.wymedia_resource is None or other.wymedia_resource is None:
			return cmp(self.name + self.type + self['id'], other.name + other.type + other['id'])
		return cmp(self.wymedia_resource['id'], other.wymedia_resource['id'])
	else:
		if isinstance(other, dict) and 'id' in other:
			return cmp(self.wymedia_resource['id'], other['id'])
		else:
			return cmp(type(self), type(other))
	return None

def execute(self):
	items = self.parent.browse()
	try:
		self.player.play(self, items)
	except Exception, e:
		PRINT_EXCEPTION(e)

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756fe6c>}
nname: 0
n 0(None)[MediaItem.__init__(self, name, type_='dailymotiondir', **kw)
self.list_fn = list_fn
self.parent = parent
self._content = None
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb756ff0c>}
nname: 142
n 142(None)[return self._content
]:
	i: 129(), 141()
	o: 

nname: 141
n 141(None)[]:
	i: 0(t)
	o: 142()

nname: 129
n 129(None)[self._content = l
]:
	i: 9(AL), 128()
	o: 142()

nname: 128
n 128(None)[]:
	i: 19(AF), 124()
	o: 129()

nname: 124
n 124(None)[]:
	i: 32(f), 50()
	o: 128()

nname: 50
n 50(None)[infos = dict(id=v_uri, uri=v_uri, thumbnail=elt._thumbnail_uri)
l.append(DailyMotionItem(elt.title, parent=self, menu=self.menu, **infos))
continue
]:
	i: 32(t)
	o: 124()

nname: 32
n 32(v_uri)[for elt in self.list_fn():
v_uri = elt._video_uri
]:
	i: 19(for)
	o: 50(t), 124(f)

nname: 19
n 19(None)[]:
	i: 9(loop)
	o: 32(for), 128(AF)

nname: 9
n 9(None)[l = []
]:
	i: 0(f)
	o: 19(loop), 129(AL)

nname: 0
n 0(self._content)[]:
	i: 
	o: 9(f), 141(t)

nname: 142
n 142(None)[return self._content
]:
	i: 129(), 0(t)
	o: 

nname: 129
n 129(None)[self._content = l
]:
	i: 9(AL), 19(AF), 32()
	o: 142()

nname: 32
n 32(None)[for elt in self.list_fn():
v_uri = elt._video_uri
if v_uri:
	infos = dict(id=v_uri, uri=v_uri, thumbnail=elt._thumbnail_uri)
	l.append(DailyMotionItem(elt.title, parent=self, menu=self.menu, **infos))
	continue
]:
	i: 19(for)
	o: 129()

nname: 19
n 19(None)[]:
	i: 9(loop)
	o: 32(for), 129(AF)

nname: 9
n 9(None)[l = []
]:
	i: 0(f)
	o: 19(loop), 129(AL)

nname: 0
n 0(self._content)[]:
	i: 
	o: 9(f), 142(t)

nname: 142
n 142(None)[return self._content
]:
	i: 32(), 0(t)
	o: 

nname: 32
n 32(None)[for elt in self.list_fn():
	v_uri = elt._video_uri
	if v_uri:
		infos = dict(id=v_uri, uri=v_uri, thumbnail=elt._thumbnail_uri)
		l.append(DailyMotionItem(elt.title, parent=self, menu=self.menu, **infos))
		continue
self._content = l
]:
	i: 9(for)
	o: 142()

nname: 9
n 9(None)[l = []
]:
	i: 0(f)
	o: 32(for)

nname: 0
n 0(self._content)[]:
	i: 
	o: 9(f), 142(t)

nname: 142
n 142(None)[return self._content
]:
	i: 9(), 0(t)
	o: 

nname: 9
n 9(None)[l = []
for elt in self.list_fn():
	v_uri = elt._video_uri
	if v_uri:
		infos = dict(id=v_uri, uri=v_uri, thumbnail=elt._thumbnail_uri)
		l.append(DailyMotionItem(elt.title, parent=self, menu=self.menu, **infos))
		continue
self._content = l
]:
	i: 0(f)
	o: 142()

nname: 0
n 0(self._content)[]:
	i: 
	o: 9(f), 142(t)

nname: 0
n 0(None)[if not self._content:
	l = []
	for elt in self.list_fn():
		v_uri = elt._video_uri
		if v_uri:
			infos = dict(id=v_uri, uri=v_uri, thumbnail=elt._thumbnail_uri)
			l.append(DailyMotionItem(elt.title, parent=self, menu=self.menu, **infos))
			continue
	self._content = l
return self._content
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb757176c>}
nname: 6
n 6(None)[def __init__(self, name, list_fn, parent=None, **kw):
	MediaItem.__init__(self, name, type_='dailymotiondir', **kw)
	self.list_fn = list_fn
	self.parent = parent
	self._content = None
	return None

def browse(self):
	if not self._content:
		l = []
		for elt in self.list_fn():
			v_uri = elt._video_uri
			if v_uri:
				infos = dict(id=v_uri, uri=v_uri, thumbnail=elt._thumbnail_uri)
				l.append(DailyMotionItem(elt.title, parent=self, menu=self.menu, **infos))
				continue
		self._content = l
	return self._content

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756fdec>}
nname: 0
n 0(None)[from pygui.facilities.rss import DailyMotionBrowser
MediaItem.__init__(self, 'DailyMotion', type_='dailymotiondir', **kw)
self.client = DailyMotionBrowser()
self.parent = parent
self._items = None
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7571ccc>}
nname: 0
n 0(None)[return self.client.search(query, lang=user_config['base']['language'])
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb757220c>}
nname: 0
n 0(None)[return self.client.search(query, lang=user_config['base']['language'])
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb757222c>}
nname: 0
n 0(None)[txt = kb._text
new_dir = DailyMotionSubContainer("%s '%s'" % (_('Search'), txt), (lambda query=txt: self.client.search(query, lang=user_config['base']['language'])), menu=self.menu, parent=self)
self._items.append(new_dir)
kb.hide()
self.menu.get_item_list('main_list').append(new_dir)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7577ccc>}
nname: 0
n 0(None)[from pygui.window import KeyboardWindow
kb = KeyboardWindow('Search for:', confirm_action=_validate)
kb.show()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7577c4c>}
nname: 0
n 0(None)[return self.client.search(lang=user_config['base']['language'], section=0)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75771ec>}
nname: 0
n 0(None)[return self.client.search(lang=user_config['base']['language'], section=0)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7577c0c>}
nname: 0
n 0(None)[return self.client.search(lang=user_config['base']['language'], section=2)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7577b4c>}
nname: 0
n 0(None)[return self.client.search(lang=user_config['base']['language'], section=2)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb757758c>}
nname: 0
n 0(None)[return self.client.search(lang=user_config['base']['language'], section=3)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7577d0c>}
nname: 0
n 0(None)[return self.client.search(lang=user_config['base']['language'], section=3)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7577b8c>}
nname: 0
n 0(None)[return self.client.search(lang=user_config['base']['language'], section=4)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7577bcc>}
nname: 0
n 0(None)[return self.client.search(lang=user_config['base']['language'], section=4)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75777ec>}
nname: 266
n 266(None)[return self._items
]:
	i: 9(), 265()
	o: 

nname: 265
n 265(None)[]:
	i: 0(t)
	o: 266()

nname: 9
n 9(None)[def _validate(kb):
	txt = kb._text
	new_dir = DailyMotionSubContainer("%s '%s'" % (_('Search'), txt), (lambda query=txt: self.client.search(query, lang=user_config['base']['language'])), menu=self.menu, parent=self)
	self._items.append(new_dir)
	kb.hide()
	self.menu.get_item_list('main_list').append(new_dir)

def _search():
	from pygui.window import KeyboardWindow
	kb = KeyboardWindow('Search for:', confirm_action=_validate)
	kb.show()

self._items = [DailyMotionSubContainer('Homepage', (lambda : self.client.search(lang=user_config['base']['language'], section=0)), menu=self.menu, parent=self), DailyMotionSubContainer('News', (lambda : self.client.search(lang=user_config['base']['language'], section=2)), menu=self.menu, parent=self), DailyMotionSubContainer('Official', (lambda : self.client.search(lang=user_config['base']['language'], section=3)), menu=self.menu, parent=self), DailyMotionSubContainer('Creative', (lambda : self.client.search(lang=user_config['base']['language'], section=4)), menu=self.menu, parent=self)]
from pygui.item.core import ActionItem
self._items.append(ActionItem(_('Search') + '...', type_='exe', menu=self.menu, action=_search))
]:
	i: 0(f)
	o: 266()

nname: 0
n 0(self._items)[]:
	i: 
	o: 9(f), 265(t)

nname: 0
n 0(None)[if not self._items:
	def _validate(kb):
		txt = kb._text
		new_dir = DailyMotionSubContainer("%s '%s'" % (_('Search'), txt), (lambda query=txt: self.client.search(query, lang=user_config['base']['language'])), menu=self.menu, parent=self)
		self._items.append(new_dir)
		kb.hide()
		self.menu.get_item_list('main_list').append(new_dir)

	def _search():
		from pygui.window import KeyboardWindow
		kb = KeyboardWindow('Search for:', confirm_action=_validate)
		kb.show()

	self._items = [DailyMotionSubContainer('Homepage', (lambda : self.client.search(lang=user_config['base']['language'], section=0)), menu=self.menu, parent=self), DailyMotionSubContainer('News', (lambda : self.client.search(lang=user_config['base']['language'], section=2)), menu=self.menu, parent=self), DailyMotionSubContainer('Official', (lambda : self.client.search(lang=user_config['base']['language'], section=3)), menu=self.menu, parent=self), DailyMotionSubContainer('Creative', (lambda : self.client.search(lang=user_config['base']['language'], section=4)), menu=self.menu, parent=self)]
	from pygui.item.core import ActionItem
	self._items.append(ActionItem(_('Search') + '...', type_='exe', menu=self.menu, action=_search))
return self._items
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb757124c>}
nname: 6
n 6(None)[__metaclass__ = MetaSingleton
def __init__(self, parent=None, **kw):
	from pygui.facilities.rss import DailyMotionBrowser
	MediaItem.__init__(self, 'DailyMotion', type_='dailymotiondir', **kw)
	self.client = DailyMotionBrowser()
	self.parent = parent
	self._items = None
	return None

def browse(self):
	if not self._items:
		def _validate(kb):
			txt = kb._text
			new_dir = DailyMotionSubContainer("%s '%s'" % (_('Search'), txt), (lambda query=txt: self.client.search(query, lang=user_config['base']['language'])), menu=self.menu, parent=self)
			self._items.append(new_dir)
			kb.hide()
			self.menu.get_item_list('main_list').append(new_dir)

		def _search():
			from pygui.window import KeyboardWindow
			kb = KeyboardWindow('Search for:', confirm_action=_validate)
			kb.show()

		self._items = [DailyMotionSubContainer('Homepage', (lambda : self.client.search(lang=user_config['base']['language'], section=0)), menu=self.menu, parent=self), DailyMotionSubContainer('News', (lambda : self.client.search(lang=user_config['base']['language'], section=2)), menu=self.menu, parent=self), DailyMotionSubContainer('Official', (lambda : self.client.search(lang=user_config['base']['language'], section=3)), menu=self.menu, parent=self), DailyMotionSubContainer('Creative', (lambda : self.client.search(lang=user_config['base']['language'], section=4)), menu=self.menu, parent=self)]
		from pygui.item.core import ActionItem
		self._items.append(ActionItem(_('Search') + '...', type_='exe', menu=self.menu, action=_search))
	return self._items

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb756f88c>}
nname: 0
n 0(None)[from __future__ import absolute_import
from ..containers import GenericContainer
from ..core import Item
from .core import MediaItem, DirItem
from peewee.debug import PRINT_EXCEPTION, DEBUG, GET_LOGGER
from peewee.misc_utils import MetaSingleton
from pygui.config import plugins, user_config
from pygui.facilities.codemapping import country_dict
from wymedia.wmplus import get_root, browse_ng, get_subtitles, create_container, object_remove, playlist_swap_children, playlist_append_child, container_search, get_metadata, set_metadata, playlist_append_marker_list, register_update_callback, unregister_update_callback, get_object, playlist_get_membership
log = GET_LOGGER(__name__)
class AudioItem(MediaItem):
	player = None
	media_update_fields = ('title', 'uri')
	def __init__(self, wymedia_resource, type_='audio', **kw):
		MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
		if AudioItem.player is None:
			try:
				from pygui.menu.players import AudioPlayer
				AudioItem.player = AudioPlayer()
			except Exception, e:
				log.error('Unable to spawn AudioPlayer: %s', str(e))
		return None

	def execute(self):
		if self.wymedia_resource:
			self._npl_decision()
		else:
			if self.parent:
				pass
			items = None
			try:
				self.player.play(self, items)
			except Exception, e:
				PRINT_EXCEPTION(e)
		return None



class ImageItem(MediaItem):
	player = None
	media_update_fields = ('title', 'uri')
	def __init__(self, wymedia_resource, type_='image', **kw):
		MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
		try:
			if ImageItem.player is None:
				from pygui.menu.players import ImageViewer
				ImageItem.player = ImageViewer()

	def execute(self):
		if self.wymedia_resource:
			self._npl_decision()
		else:
			if self.parent:
				pass
			items = None
			try:
				self.player.play(self, items)
			except Exception, e:
				PRINT_EXCEPTION(e)
		return None



class VideoItem(MediaItem):
	player = None
	media_update_fields = ('title', 'uri', 'height', 'nrAudioChannels')
	def __init__(self, wymedia_resource, type_='video', **kw):
		MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
		if VideoItem.player is None:
			try:
				from pygui.menu.players import VideoPlayer
				VideoItem.player = VideoPlayer()
			except Exception, e:
				log.error('Unable to spawn VideoPlayer: %s', str(e))
		return None

	def execute(self, delay=None):
		if self.wymedia_resource:
			if delay is None:
				self._npl_decision()
			else:
				self._npl_decision(delay=delay)
		else:
			if self.parent:
				pass
			items = None
			try:
				self.player.play(self, items)
			except Exception, e:
				PRINT_EXCEPTION(e)
		return None

	wpl_options = {}


class TVRecordItem(VideoItem):
	__doc__ = 'TV record (MPEG-2 TS). Extra options have to be passed\n    to wyplayer to ensure proper playback.\n    '
	media_update_fields = ('title', 'uri', 'recordedDuration', 'dvbServiceId', 'channelName', 'recordedStartDateTime')
	wpl_options = property()


class DVDItem(MediaItem):
	player = None
	def __init__(self, wymedia_resource, type_='dvd', **kw):
		MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
		if DVDItem.player is None:
			try:
				from pygui.menu.players import DVDPlayer
				DVDItem.player = DVDPlayer()
			except Exception, e:
				log.error(' No DVD Player support: %s', str(e))
		return None

	def browse(self):
		if user_config['video']['dvdbrowse']:
			return WindowedItemList(self, menu=self.menu, universe=self.universe)

	def execute(self, delay=0):
		if self['backend'] != 'upnp':
			try:
				self.player.play(self, playlist=None, delay=delay)
			except Exception, e:
				PRINT_EXCEPTION(e)
		return None



class IsoDVDItem(DVDItem):
	def __init__(self, wymedia_resource, type_='iso_dvd', **kw):
		DVDItem.__init__(self, wymedia_resource, type_=type_, **kw)

	def browse(self):
		pass



class UpnpDirItem(DirItem):
	__doc__ = ' Item representing UPNP directory '
	def __init__(self, wymedia_resource, type_='upnp', **kw):
		DirItem.__init__(self, wymedia_resource, type_=type_, **kw)



class UsbDirItem(DirItem):
	__doc__ = ' Item representing Usb directory/device '
	def __init__(self, wymedia_resource, type_='usb_device', **kw):
		DirItem.__init__(self, wymedia_resource, type_=type_, **kw)



class YouTubeItem(VideoItem):
	player = None
	def __init__(self, name, parent, **kw):
		if YouTubeItem.player is None:
			try:
				from pygui.menu.players.video_player import YoutubePlayer
				YouTubeItem.player = YoutubePlayer()
			except Exception, e:
				log.error('Unable to spawn YouTubeVideoPlayer: %s', str(e))
		VideoItem.__init__(self, name, type_='youtubevideo', **kw)
		self.parent = parent
		return None

	wpl_options = dict(live='1', ifmt='mov,mp4,m4a,3gp,3g2,mj2', probe='0')
	def media_update(self):
		from pygui.facilities.turlututube import YoutubeData
		self['uri'] = YoutubeData()._get_flv_uri(self['player_url'])

	def __hash__(self):
		return hash(self['id'])

	def __eq__(self, other):
		if isinstance(other, YouTubeItem):
			if self['thumbnail'] == other['thumbnail']:
				pass
			return self['thumbnail'] == other['thumbnail']
		return False

	def __ne__(self, other):
		return not self == other

	def __cmp__(self, other):
		if isinstance(other, MediaItem):
			if self.wymedia_resource is None or other.wymedia_resource is None:
				return cmp(self.name + self.type + self['id'], other.name + other.type + other['id'])
			return cmp(self.wymedia_resource['id'], other.wymedia_resource['id'])
		else:
			if isinstance(other, dict) and 'id' in other:
				return cmp(self.wymedia_resource['id'], other['id'])
			else:
				return cmp(type(self), type(other))
		return None

	def execute(self):
		items = self.parent.browse()
		try:
			self.player.play(self, items)
		except Exception, e:
			PRINT_EXCEPTION(e)



class YouTubeSubContainer(MediaItem, GenericContainer):
	def __init__(self, name, list_fn, parent=None, **kw):
		MediaItem.__init__(self, name, type_='youtubedir', **kw)
		self.list_fn = list_fn
		self.parent = parent
		self._content = None
		return None

	def browse(self):
		pass



class YouTubeContainer(MediaItem, GenericContainer):
	__metaclass__ = MetaSingleton
	def __init__(self, parent=None, **kw):
		from pygui.facilities.turlututube import YoutubeData
		MediaItem.__init__(self, 'YouTube', type_='youtubedir', **kw)
		self.client = YoutubeData()
		self.parent = parent
		self._items = None
		return None

	def browse(self):
		pass



class DailyMotionItem(VideoItem):
	player = None
	def __init__(self, name, parent, **kw):
		if DailyMotionItem.player is None:
			try:
				from pygui.menu.players.video_player import DailyMotionPlayer
				DailyMotionItem.player = DailyMotionPlayer()
			except Exception, e:
				log.error('Unable to spawn DailyMotionVideoPlayer: %s', str(e))
		VideoItem.__init__(self, name, type_='dailymotionvideo', **kw)
		self.parent = parent
		return None

	wpl_options = dict(vdrv='softdec', adrv='softdec', outwin=(0.080000000000000002, 0.17999999999999999, 0.45000000000000001, 0.59999999999999998), live='1', ifmt='flv', probe='0')
	def __hash__(self):
		return hash(self['id'])

	def __eq__(self, other):
		if isinstance(other, DailyMotionItem):
			if self['thumbnail'] == other['thumbnail']:
				pass
			return self['thumbnail'] == other['thumbnail']
		return False

	def __ne__(self, other):
		return not self == other

	def __cmp__(self, other):
		if isinstance(other, MediaItem):
			if self.wymedia_resource is None or other.wymedia_resource is None:
				return cmp(self.name + self.type + self['id'], other.name + other.type + other['id'])
			return cmp(self.wymedia_resource['id'], other.wymedia_resource['id'])
		else:
			if isinstance(other, dict) and 'id' in other:
				return cmp(self.wymedia_resource['id'], other['id'])
			else:
				return cmp(type(self), type(other))
		return None

	def execute(self):
		items = self.parent.browse()
		try:
			self.player.play(self, items)
		except Exception, e:
			PRINT_EXCEPTION(e)



class DailyMotionSubContainer(MediaItem, GenericContainer):
	def __init__(self, name, list_fn, parent=None, **kw):
		MediaItem.__init__(self, name, type_='dailymotiondir', **kw)
		self.list_fn = list_fn
		self.parent = parent
		self._content = None
		return None

	def browse(self):
		if not self._content:
			l = []
			for elt in self.list_fn():
				v_uri = elt._video_uri
				if v_uri:
					infos = dict(id=v_uri, uri=v_uri, thumbnail=elt._thumbnail_uri)
					l.append(DailyMotionItem(elt.title, parent=self, menu=self.menu, **infos))
					continue
			self._content = l
		return self._content



class DailyMotionContainer(MediaItem, GenericContainer):
	__metaclass__ = MetaSingleton
	def __init__(self, parent=None, **kw):
		from pygui.facilities.rss import DailyMotionBrowser
		MediaItem.__init__(self, 'DailyMotion', type_='dailymotiondir', **kw)
		self.client = DailyMotionBrowser()
		self.parent = parent
		self._items = None
		return None

	def browse(self):
		if not self._items:
			def _validate(kb):
				txt = kb._text
				new_dir = DailyMotionSubContainer("%s '%s'" % (_('Search'), txt), (lambda query=txt: self.client.search(query, lang=user_config['base']['language'])), menu=self.menu, parent=self)
				self._items.append(new_dir)
				kb.hide()
				self.menu.get_item_list('main_list').append(new_dir)

			def _search():
				from pygui.window import KeyboardWindow
				kb = KeyboardWindow('Search for:', confirm_action=_validate)
				kb.show()

			self._items = [DailyMotionSubContainer('Homepage', (lambda : self.client.search(lang=user_config['base']['language'], section=0)), menu=self.menu, parent=self), DailyMotionSubContainer('News', (lambda : self.client.search(lang=user_config['base']['language'], section=2)), menu=self.menu, parent=self), DailyMotionSubContainer('Official', (lambda : self.client.search(lang=user_config['base']['language'], section=3)), menu=self.menu, parent=self), DailyMotionSubContainer('Creative', (lambda : self.client.search(lang=user_config['base']['language'], section=4)), menu=self.menu, parent=self)]
			from pygui.item.core import ActionItem
			self._items.append(ActionItem(_('Search') + '...', type_='exe', menu=self.menu, action=_search))
		return self._items



from .progressive_result import WindowedItemList
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75596ec>}
from __future__ import absolute_import
from ..containers import GenericContainer
from ..core import Item
from .core import MediaItem, DirItem
from peewee.debug import PRINT_EXCEPTION, DEBUG, GET_LOGGER
from peewee.misc_utils import MetaSingleton
from pygui.config import plugins, user_config
from pygui.facilities.codemapping import country_dict
from wymedia.wmplus import get_root, browse_ng, get_subtitles, create_container, object_remove, playlist_swap_children, playlist_append_child, container_search, get_metadata, set_metadata, playlist_append_marker_list, register_update_callback, unregister_update_callback, get_object, playlist_get_membership
log = GET_LOGGER(__name__)
class AudioItem(MediaItem):
	player = None
	media_update_fields = ('title', 'uri')
	def __init__(self, wymedia_resource, type_='audio', **kw):
		MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
		if AudioItem.player is None:
			try:
				from pygui.menu.players import AudioPlayer
				AudioItem.player = AudioPlayer()
			except Exception, e:
				log.error('Unable to spawn AudioPlayer: %s', str(e))
		return None

	def execute(self):
		if self.wymedia_resource:
			self._npl_decision()
		else:
			if self.parent:
				pass
			items = None
			try:
				self.player.play(self, items)
			except Exception, e:
				PRINT_EXCEPTION(e)
		return None



class ImageItem(MediaItem):
	player = None
	media_update_fields = ('title', 'uri')
	def __init__(self, wymedia_resource, type_='image', **kw):
		MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
		try:
			if ImageItem.player is None:
				from pygui.menu.players import ImageViewer
				ImageItem.player = ImageViewer()

	def execute(self):
		if self.wymedia_resource:
			self._npl_decision()
		else:
			if self.parent:
				pass
			items = None
			try:
				self.player.play(self, items)
			except Exception, e:
				PRINT_EXCEPTION(e)
		return None



class VideoItem(MediaItem):
	player = None
	media_update_fields = ('title', 'uri', 'height', 'nrAudioChannels')
	def __init__(self, wymedia_resource, type_='video', **kw):
		MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
		if VideoItem.player is None:
			try:
				from pygui.menu.players import VideoPlayer
				VideoItem.player = VideoPlayer()
			except Exception, e:
				log.error('Unable to spawn VideoPlayer: %s', str(e))
		return None

	def execute(self, delay=None):
		if self.wymedia_resource:
			if delay is None:
				self._npl_decision()
			else:
				self._npl_decision(delay=delay)
		else:
			if self.parent:
				pass
			items = None
			try:
				self.player.play(self, items)
			except Exception, e:
				PRINT_EXCEPTION(e)
		return None

	wpl_options = {}


class TVRecordItem(VideoItem):
	__doc__ = 'TV record (MPEG-2 TS). Extra options have to be passed\n    to wyplayer to ensure proper playback.\n    '
	media_update_fields = ('title', 'uri', 'recordedDuration', 'dvbServiceId', 'channelName', 'recordedStartDateTime')
	wpl_options = property()


class DVDItem(MediaItem):
	player = None
	def __init__(self, wymedia_resource, type_='dvd', **kw):
		MediaItem.__init__(self, wymedia_resource, type_=type_, **kw)
		if DVDItem.player is None:
			try:
				from pygui.menu.players import DVDPlayer
				DVDItem.player = DVDPlayer()
			except Exception, e:
				log.error(' No DVD Player support: %s', str(e))
		return None

	def browse(self):
		if user_config['video']['dvdbrowse']:
			return WindowedItemList(self, menu=self.menu, universe=self.universe)

	def execute(self, delay=0):
		if self['backend'] != 'upnp':
			try:
				self.player.play(self, playlist=None, delay=delay)
			except Exception, e:
				PRINT_EXCEPTION(e)
		return None



class IsoDVDItem(DVDItem):
	def __init__(self, wymedia_resource, type_='iso_dvd', **kw):
		DVDItem.__init__(self, wymedia_resource, type_=type_, **kw)

	def browse(self):
		pass



class UpnpDirItem(DirItem):
	__doc__ = ' Item representing UPNP directory '
	def __init__(self, wymedia_resource, type_='upnp', **kw):
		DirItem.__init__(self, wymedia_resource, type_=type_, **kw)



class UsbDirItem(DirItem):
	__doc__ = ' Item representing Usb directory/device '
	def __init__(self, wymedia_resource, type_='usb_device', **kw):
		DirItem.__init__(self, wymedia_resource, type_=type_, **kw)



class YouTubeItem(VideoItem):
	player = None
	def __init__(self, name, parent, **kw):
		if YouTubeItem.player is None:
			try:
				from pygui.menu.players.video_player import YoutubePlayer
				YouTubeItem.player = YoutubePlayer()
			except Exception, e:
				log.error('Unable to spawn YouTubeVideoPlayer: %s', str(e))
		VideoItem.__init__(self, name, type_='youtubevideo', **kw)
		self.parent = parent
		return None

	wpl_options = dict(live='1', ifmt='mov,mp4,m4a,3gp,3g2,mj2', probe='0')
	def media_update(self):
		from pygui.facilities.turlututube import YoutubeData
		self['uri'] = YoutubeData()._get_flv_uri(self['player_url'])

	def __hash__(self):
		return hash(self['id'])

	def __eq__(self, other):
		if isinstance(other, YouTubeItem):
			if self['thumbnail'] == other['thumbnail']:
				pass
			return self['thumbnail'] == other['thumbnail']
		return False

	def __ne__(self, other):
		return not self == other

	def __cmp__(self, other):
		if isinstance(other, MediaItem):
			if self.wymedia_resource is None or other.wymedia_resource is None:
				return cmp(self.name + self.type + self['id'], other.name + other.type + other['id'])
			return cmp(self.wymedia_resource['id'], other.wymedia_resource['id'])
		else:
			if isinstance(other, dict) and 'id' in other:
				return cmp(self.wymedia_resource['id'], other['id'])
			else:
				return cmp(type(self), type(other))
		return None

	def execute(self):
		items = self.parent.browse()
		try:
			self.player.play(self, items)
		except Exception, e:
			PRINT_EXCEPTION(e)



class YouTubeSubContainer(MediaItem, GenericContainer):
	def __init__(self, name, list_fn, parent=None, **kw):
		MediaItem.__init__(self, name, type_='youtubedir', **kw)
		self.list_fn = list_fn
		self.parent = parent
		self._content = None
		return None

	def browse(self):
		pass



class YouTubeContainer(MediaItem, GenericContainer):
	__metaclass__ = MetaSingleton
	def __init__(self, parent=None, **kw):
		from pygui.facilities.turlututube import YoutubeData
		MediaItem.__init__(self, 'YouTube', type_='youtubedir', **kw)
		self.client = YoutubeData()
		self.parent = parent
		self._items = None
		return None

	def browse(self):
		pass



class DailyMotionItem(VideoItem):
	player = None
	def __init__(self, name, parent, **kw):
		if DailyMotionItem.player is None:
			try:
				from pygui.menu.players.video_player import DailyMotionPlayer
				DailyMotionItem.player = DailyMotionPlayer()
			except Exception, e:
				log.error('Unable to spawn DailyMotionVideoPlayer: %s', str(e))
		VideoItem.__init__(self, name, type_='dailymotionvideo', **kw)
		self.parent = parent
		return None

	wpl_options = dict(vdrv='softdec', adrv='softdec', outwin=(0.080000000000000002, 0.17999999999999999, 0.45000000000000001, 0.59999999999999998), live='1', ifmt='flv', probe='0')
	def __hash__(self):
		return hash(self['id'])

	def __eq__(self, other):
		if isinstance(other, DailyMotionItem):
			if self['thumbnail'] == other['thumbnail']:
				pass
			return self['thumbnail'] == other['thumbnail']
		return False

	def __ne__(self, other):
		return not self == other

	def __cmp__(self, other):
		if isinstance(other, MediaItem):
			if self.wymedia_resource is None or other.wymedia_resource is None:
				return cmp(self.name + self.type + self['id'], other.name + other.type + other['id'])
			return cmp(self.wymedia_resource['id'], other.wymedia_resource['id'])
		else:
			if isinstance(other, dict) and 'id' in other:
				return cmp(self.wymedia_resource['id'], other['id'])
			else:
				return cmp(type(self), type(other))
		return None

	def execute(self):
		items = self.parent.browse()
		try:
			self.player.play(self, items)
		except Exception, e:
			PRINT_EXCEPTION(e)



class DailyMotionSubContainer(MediaItem, GenericContainer):
	def __init__(self, name, list_fn, parent=None, **kw):
		MediaItem.__init__(self, name, type_='dailymotiondir', **kw)
		self.list_fn = list_fn
		self.parent = parent
		self._content = None
		return None

	def browse(self):
		if not self._content:
			l = []
			for elt in self.list_fn():
				v_uri = elt._video_uri
				if v_uri:
					infos = dict(id=v_uri, uri=v_uri, thumbnail=elt._thumbnail_uri)
					l.append(DailyMotionItem(elt.title, parent=self, menu=self.menu, **infos))
					continue
			self._content = l
		return self._content



class DailyMotionContainer(MediaItem, GenericContainer):
	__metaclass__ = MetaSingleton
	def __init__(self, parent=None, **kw):
		from pygui.facilities.rss import DailyMotionBrowser
		MediaItem.__init__(self, 'DailyMotion', type_='dailymotiondir', **kw)
		self.client = DailyMotionBrowser()
		self.parent = parent
		self._items = None
		return None

	def browse(self):
		if not self._items:
			def _validate(kb):
				txt = kb._text
				new_dir = DailyMotionSubContainer("%s '%s'" % (_('Search'), txt), (lambda query=txt: self.client.search(query, lang=user_config['base']['language'])), menu=self.menu, parent=self)
				self._items.append(new_dir)
				kb.hide()
				self.menu.get_item_list('main_list').append(new_dir)

			def _search():
				from pygui.window import KeyboardWindow
				kb = KeyboardWindow('Search for:', confirm_action=_validate)
				kb.show()

			self._items = [DailyMotionSubContainer('Homepage', (lambda : self.client.search(lang=user_config['base']['language'], section=0)), menu=self.menu, parent=self), DailyMotionSubContainer('News', (lambda : self.client.search(lang=user_config['base']['language'], section=2)), menu=self.menu, parent=self), DailyMotionSubContainer('Official', (lambda : self.client.search(lang=user_config['base']['language'], section=3)), menu=self.menu, parent=self), DailyMotionSubContainer('Creative', (lambda : self.client.search(lang=user_config['base']['language'], section=4)), menu=self.menu, parent=self)]
			from pygui.item.core import ActionItem
			self._items.append(ActionItem(_('Search') + '...', type_='exe', menu=self.menu, action=_search))
		return self._items



from .progressive_result import WindowedItemList
